﻿<%@ WebHandler Language="C#" Class="TopicReply" %>

using System;
using System.Web;

public class TopicReply : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        int ID = Convert.ToInt32(context.Request["ID"]);
        string reply = context.Request["reply"].ToString();
        UserHelper u = new UserHelper();
        try
        {
            if (u.UpDateMessageContent(ID,reply))
            {
                context.Response.Write(1);
            }
        }
        catch
        {
            context.Response.Write(0); 
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}